package com.ruoyi.supply.enums;

import lombok.Getter;

/**
 * @author huangxiong
 * @date 2025/06/05 21:27
 */
@Getter
public enum SupplyInfoTypeEnum {

    // 货源，地点
    SOURCE("0","货源"),
    LOCATION("1","地点");

    public final String code;
    public final String desc;
    SupplyInfoTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SupplyInfoTypeEnum getByCode(String code) {
        for (SupplyInfoTypeEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }


}
